<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>儿子的儿子叫孙子</title>
    <script src="./res/jquery-3.5.1.min.js"></script>
    <style>
        .box {
            display: block;
            border: 2px solid #abcdef;
            color: #331258;
            padding: 5px;
            margin: 15px;
        }
    </style>
</head>

<body>
    <div class="box">
        box
        <div id="content" style="width: 500px;">
            div ul
            <p class="link-item">
                p01
                <sapn>span01</sapn>
            </p>
            <p class="link-item link-item-active">
                p02
                <sapn>span02</sapn>
            </p>
        </div>
    </div>
</body>

</html>
<script>
    $(function(e) {
        $('#content').children("p.link-item-active").css({
            'color': '#F00',
            'border': '3px solid #F00'
        });
    });
</script>